package top.psjj.mall.model.dto;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 接受产品分类
 */
@Data
public class AddCategoryReq {
    @NotBlank(message = "商品不能为空")
    private String name;
    @NotNull(message="商品的父id不能为空")
    private Integer categoryId;
    @NotNull(message = "商品价格不能为空")
    @Min(value = 1,message = "价格不能低于1分")
    private Integer price;
    @NotNull(message = "库存不能为null")
    @Max(value = 1000,message = "库存不能大于1000")
    private Integer stock;
    private String detail;
    @NotBlank(message = "图片路径不能为null")
    private String image;
}
